{PrivateDNS} Fix linter error#1
Merged
rajitaaa merged 1 commit intorajitaaa:raghosalfrom Apr 22, 2021
Merged
Conversation
jsntcy
commented
Apr 22, 2021
|
|
||
| network_privatedns_zone_sdk = CliCommandType( | ||
| operations_tmpl='azure.mgmt.privatedns.operations.private_zones_operations#PrivateZonesOperations.{}', | ||
| operations_tmpl='azure.mgmt.privatedns.operations#PrivateZonesOperations.{}', |
Author
There was a problem hiding this comment.
Now the file name is changed from private_zones_operations to _private_zones_operations, so remove this unnecessary subitem in module path. You can find the name in SDK source code.
jsntcy
commented
Apr 22, 2021
| g.custom_command('export', 'export_zone') | ||
| g.custom_command('create', 'create_privatedns_zone', client_factory=cf_privatedns_mgmt_zones, supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='begin_create_or_update', custom_func_name='update_privatedns_zone', supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='begin_update', custom_func_name='update_privatedns_zone', supports_no_wait=True) |
Author
There was a problem hiding this comment.
We use update before, so should use begin_update now.
jsntcy
commented
Apr 22, 2021
| g.command('list', 'list', table_transformer=transform_privatedns_link_table_output) | ||
| g.custom_command('create', 'create_privatedns_link', client_factory=cf_privatedns_mgmt_virtual_network_links, supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='begin_create_or_update', custom_func_name='update_privatedns_link', setter_type=network_privatedns_custom, supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='update_privatedns_link', setter_type=network_privatedns_custom, supports_no_wait=True) |
Author
There was a problem hiding this comment.
No custom_func_name before for this generic_update_command()
jsntcy
commented
Apr 22, 2021
| with self.command_group('network private-dns record-set {}'.format(record), network_privatedns_record_set_sdk) as g: | ||
| g.show_command('show', 'get', transform=transform_privatedns_record_set_output, table_transformer=transform_privatedns_record_set_table_output) | ||
| g.command('delete', 'begin_delete', confirmation=True) | ||
| g.command('delete', 'delete', confirmation=True) |
Author
There was a problem hiding this comment.
Should not add begin_ prefix as delete and create_or_update commands for record-set are not long running operations. You can find the method name in SDK source code.
Remove other unnecessary begin_ prefixes as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes I made:
begin_prefix fromrecord-setcommand, only long running operation need this prefix,create_or_updateanddeleteare not LRO forrecord-set, you can check if we need addbegin_prefix in SDK source code.operations_tmpl='azure.mgmt.privatedns.operations#PrivateZonesOperations.{}'begin_create_or_updatetobegin_updatefrom someupdatecommands as previously we useupdate.Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.